package com.project.modules.redEnvelope.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.project.modules.redEnvelope.model.TblRedEnvelope;

import java.math.BigDecimal;
import java.util.Date;

/**
 * Service
 *
 * @author Qing2514
 */
public interface TblRedEnvelopeService extends IService<TblRedEnvelope> {

    /**
     * 根据关键词分页模糊查询
     *
     * @param keyword  关键词
     * @param pageSize 页大小
     * @param pageNum  页码
     * @return 列表
     */
    Page<TblRedEnvelope> getPage(Long keyword, Integer pageSize, Integer pageNum);


    void scheduleStartAndEnd(Long redId, Date startTime, Date endTime);

    void incomeAndNotice(long redId, long userId, BigDecimal money, String msg, Date date);

    void income(long userId, BigDecimal earnedMoney);

//    /**
//     * 结算红包
//     *
//     * @param redId
//     */
//    void settleRedEnvelope(Long redId);
}